import QtQuick 2.3
import "qrc:///content"
import "qrc:///Constants.js" as Constants

Rectangle
{
    // Identifier of the item
    id: loading

    // common properties

    anchors.fill: parent
    color: Constants.backgroundColor

    // Testing purpose (Design)
    width: 200
    height: 400

    Caption
    {
        id: caption
        label: "Whandgo"
    }

    Image
    {
        id: logoLoading
        anchors.verticalCenterOffset: -100
        anchors.verticalCenter: parent.verticalCenter
        anchors.horizontalCenter: parent.horizontalCenter
        source: "qrc:///images/loading.png"

        RotationAnimation
        {
            target: logoLoading
            loops: Animation.Infinite
            from: 0
            to: 360
            duration:2000
            running: true
        }
    }

    Text
    {
        id: loadingText
        font.pointSize: 15
        text: "...Loading..."
        horizontalAlignment: Text.AlignHCenter
        anchors.right: parent.right
        anchors.left: parent.left
        anchors.verticalCenterOffset: 0
        anchors.verticalCenter: parent.verticalCenter
        color: Constants.titleBackgroundColor
        font.family: "Arial"
    }
}
